import request from '@/utils/request'

export const getCommodityList = function(params) {
  return request({
    url: '/api/vm-service/skuClass/search',
    method: 'GET',
    params
  })
}
export const addList = function(data) {
  return request({
    url: '/api/vm-service/skuClass',
    method: 'POST',
    data
  })
}
export const removeList = function(data) {
  return request({
    url: '/api/vm-service/skuClass/' + data.classId,
    method: 'DELETE'
  })
}
export const updateList = function(data) {
  return request({
    url: '/api/vm-service/skuClass/' + data.classId,
    method: 'PUT',
    data
  })
}
export const getCommodity = function(params) {
  return request({
    url: '/api/vm-service/sku/search',
    method: 'GET',
    params
  })
}
export const addSp = function(data) {
  return request({
    url: '/api/vm-service/sku',
    method: 'POST',
    data
  })
}
export const updateSp = function(data) {
  return request({
    url: '/api/vm-service/sku/' + data.skuId,
    method: 'PUT',
    data
  })
}
export const addFileList = function(data) {
  return request({
    url: '/api/vm-service/sku/upload',
    method: 'POST',
    data
  })
}

